<html>
<head><meta charset="utf-8"><title>lto=fat vs lto=thin · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html">lto=fat vs lto=thin</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="201127868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/lto%3Dfat%20vs%20lto%3Dthin/near/201127868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sebastien Marie (semarie) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html#201127868">(Jun 17 2020 at 11:19)</a>:</h4>
<p>I recently opened an issue on firefox (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1644409">https://bugzilla.mozilla.org/show_bug.cgi?id=1644409</a>) about the use of -Clto (which is lto=fat) for build gkrust component, instead of the use of lto=thin which is advertized by cargo documentation as "takes substantially less time to run while still achieving performance gains similar to "fat". "</p>



<a name="201127959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/lto%3Dfat%20vs%20lto%3Dthin/near/201127959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sebastien Marie (semarie) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html#201127959">(Jun 17 2020 at 11:20)</a>:</h4>
<p>from testing, it seems that the use of lto=thin generate bunch of compilation and runtime failures: <a href="https://treeherder.mozilla.org/#/jobs?repo=try&amp;revision=8ec46beabce7d1e586253e59de66df642e4a50f4">https://treeherder.mozilla.org/#/jobs?repo=try&amp;revision=8ec46beabce7d1e586253e59de66df642e4a50f4</a></p>



<a name="201128008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/lto%3Dfat%20vs%20lto%3Dthin/near/201128008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sebastien Marie (semarie) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html#201128008">(Jun 17 2020 at 11:21)</a>:</h4>
<p>does someone has some elements about these lto=thin failures ?</p>



<a name="201128035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/lto%3Dfat%20vs%20lto%3Dthin/near/201128035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sebastien Marie (semarie) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html#201128035">(Jun 17 2020 at 11:22)</a>:</h4>
<p>as firefox build heavy uses sccache, I wonder if it could be implied. but I am unsure.</p>



<a name="201517031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/lto%3Dfat%20vs%20lto%3Dthin/near/201517031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sebastien Marie (semarie) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html#201517031">(Jun 21 2020 at 04:59)</a>:</h4>
<p>where could I find the specific code for lto ? is it a rust code or a LLVM code ?</p>



<a name="201524427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/lto%3Dfat%20vs%20lto%3Dthin/near/201524427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/lto.3Dfat.20vs.20lto.3Dthin.html#201524427">(Jun 21 2020 at 08:43)</a>:</h4>
<p>LTO itself is an LLVM thing. The driver code at the rustc side is at <a href="https://github.com/rust-lang/rust/blob/228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2/src/librustc_codegen_llvm/back/lto.rs">https://github.com/rust-lang/rust/blob/228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2/src/librustc_codegen_llvm/back/lto.rs</a> and <a href="https://github.com/rust-lang/rust/blob/228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2/src/librustc_codegen_ssa/back/lto.rs">https://github.com/rust-lang/rust/blob/228a0ed7b0cef2fbfeb781acf6c23015ccc40ba2/src/librustc_codegen_ssa/back/lto.rs</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>